#!/usr/bin/env python
PACKAGE = "ufomap_mapping"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#           Name                 Type      Level Description                                            Default Min  Max
gen.add("frame_id",              str_t,    1,    "Frame id of the map",                                 "map")

gen.add("max_range",             double_t, 2,    "Max range (m) when integrating data into map",        -1.0,    -1.0, 100.0)
gen.add("insert_depth",          int_t,    2,    "Integration depth",                                   0,      0,   10)
gen.add("simple_ray_casting",    bool_t,   2,    "Use simple ray casting", 															False)
gen.add("early_stopping",        int_t,    2,    "Early stopping",                                      0,      0,   10)
gen.add("async",    						 bool_t,   2,    "Async integration", 															    True)

gen.add("clear_robot",           bool_t,   3,    "Clear map at robot position",                         False)
gen.add("robot_frame_id",        str_t,    3,    "Frame id of the robot",                               "base_link")
gen.add("robot_height",          double_t, 3,    "Robot height (m)",                                    0.2,    0.0, 100.0)
gen.add("robot_radius",          double_t, 3,    "Robot radius (m)",                                    0.5,    0.0, 100.0)
gen.add("clearing_depth",        int_t,    3,    "Clearing depth",                                      0,      0,   10)

gen.add("compress",              bool_t,   4,    "Compress msgs", 															        False)
gen.add("update_part_of_map",    bool_t,   4,    "Publish updated parts of map",												True)
gen.add("update_rate",           double_t, 4,    "How often map updates should be published (/s) (0 == asap)",      0.0,    0.0, 100.0)
gen.add("publish_depth",         int_t,    4,    "Depth of published map(s)",                              4,      0,   10)

gen.add("prob_hit",              double_t, 5,    "Probability for hit",                                 0.7,    0.5, 1.0)
gen.add("prob_miss",             double_t, 5,    "Probability for miss",                                0.4,    0.0, 0.5)
gen.add("clamping_thres_min",    double_t, 5,    "Minimum clamping threshold",                          0.1192, 0.0, 1.0)
gen.add("clamping_thres_max",    double_t, 5,    "Maximum clamping threshold",                          0.971,  0.0, 1.0)

gen.add("pub_rate",              double_t, 6,    "How often the whole map should be published (/s) (0 == never)",    0.0,    0.0, 100.0)

gen.add("transform_timeout",     double_t, 7,    "How long to wait for transform (s)",                  0.1,    0.0, 100.0)

gen.add("map_queue_size",        int_t,    8,    "Queue size for map",                                  10,      0,   10000)
gen.add("cloud_in_queue_size",   int_t,    8,    "Queue size for cloud_in",                             10,     0,   10000)
gen.add("map_latch",             bool_t,   8,    "Enable latched map topic",                            False)

gen.add("verbose",               bool_t,   9,    "Enable verbose output",                               False)

exit(gen.generate(PACKAGE, "ufomap_mapping", "Server"))
